package com.myh.springcloud.service;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.myh.springcloud.pojo.User;

/*
**2020年7月13日--下午5:06:04
**@version:
**莫耀华:
**@Description:
*/

//远程调用 根据服务名
@Component
@FeignClient(value = "SPRINGCLOUD-PROVIDER-DEPT",fallbackFactory = IUSerServiceFallBackfactory.class)
public interface IUSerService {
	
	@RequestMapping("/user/get/{id}")
	public User queryById(@PathVariable("id")Long id);
	@GetMapping("/user/getAll")
	public List<User> quertAll();
	@PostMapping("/user/add")
	public boolean addUser(User user);
}
